﻿<%@ Page Title="Invoice Report" Language="C#" MasterPageFile="~/AuditBillingMaster.master" AutoEventWireup="true" CodeFile="InvoiceReport.aspx.cs" Inherits="InvoiceReport" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../JS/Forms/jsInvoiceReport.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cntList" runat="Server">
    <input type="hidden" id="hdnInvoiceID" runat="server" value="0" clientidmode="Static" />
    <asp:HiddenField ID="hdnCompletedContractPer" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnTotalContractAmount" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnMaxContractInvoice" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnCompletedInvAmount" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnServiceTaxPer" runat="server" ClientIDMode="Static" />

    <div class="pagecontent">
        <div class="headercontainer">
            <div class="headertextcontainer halfpanel">
                Invoice Report
            </div>
            <div class="headerbuttoncontainer halfpanel">
                <a id="A1" href='javascript:void(0);' onclick="toggle_TopContainer();" tabindex="12" class="headersearchbutton" title="Toggle Search Panel" runat="server">Search</a>&nbsp;&nbsp;
                <a href="InvoiceReport.aspx?Excel" class="headerexportbutton" tabindex="13">Export To Excel</a>

            </div>
        </div>
        <div id="divTopContainer" class="topcontainerwrapper">
            <div class="topcontainerSmall" onkeypress="javascript:return fireDefaultButton(event, 'btnSearch')">
                <div class="halfpanel">
                    <div class="row">
                        <asp:DropDownList ID="cboCompany" ClientIDMode="Static" runat="server" TabIndex="2" multiple="multiple" placeholder="All Companies"
                            CssClass="searchCntrl" Width="70%">
                        </asp:DropDownList>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <asp:DropDownList ID="cboContract" ClientIDMode="Static" runat="server" TabIndex="4" multiple="multiple" placeholder="All Contracts"
                            CssClass="searchCntrl" Width="70%">
                        </asp:DropDownList>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <asp:TextBox ID="txtInvoiceNo" runat="server" ClientIDMode="Static" MaxLength="50"
                            TabIndex="6" CssClass="searchCntrl" placeholder="Enter Invoice #"></asp:TextBox>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="labelPad4">
                            Invoice Start Date
                        </div>
                        <div class="value">
                            <div class="input-append date">
                                <asp:TextBox ID="txtInvoiceStartDate" runat="server" ClientIDMode="Static" MaxLength="50"
                                    onclick="show_DateCalender('txtInvoiceStartDate');" TabIndex="8" CssClass="dateinput"
                                    ReadOnly="true" placeholder="dd/mm/yyyy" onkeydown="javascript:return clearDates(event);"></asp:TextBox>
                                <span class="add-on" id="Span8" onclick="show_DateCalender('txtInvoiceStartDate');" style="float: right"><i
                                    class="icon-th"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <div class="labelPad4">
                            Invoice End Date
                        </div>
                        <div class="value">
                            <div class="input-append date">
                                <asp:TextBox ID="txtInvoiceEndDate" runat="server" ClientIDMode="Static" MaxLength="50"
                                    onclick="show_DateCalender('txtInvoiceEndDate');" TabIndex="10" CssClass="dateinput"
                                    ReadOnly="true" placeholder="dd/mm/yyyy" onkeydown="javascript:return clearDates(event);"></asp:TextBox>
                                <span class="add-on" id="Span5" onclick="show_DateCalender('txtInvoiceEndDate');" style="float: right"><i
                                    class="icon-th"></i></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="halfpanel">
                    <div class="row">
                        <asp:DropDownList ID="cboClient" ClientIDMode="Static" runat="server" TabIndex="3" multiple="multiple" placeholder="All Clients"
                            CssClass="searchCntrl" Width="70%">
                        </asp:DropDownList>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <asp:DropDownList ID="cboPaymentMode" ClientIDMode="Static" runat="server" TabIndex="5" multiple="multiple" placeholder="All Payment Modes"
                            CssClass="searchCntrl" Width="70%">
                        </asp:DropDownList>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <asp:TextBox ID="txtContractNo" runat="server" ClientIDMode="Static" MaxLength="50"
                            TabIndex="7" CssClass="searchCntrl" placeholder="Enter Contract #"></asp:TextBox>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                        <asp:DropDownList ID="cboFinancialYear" ClientIDMode="Static" runat="server" TabIndex="9" placeholder="Current Financial Year" multiple="multiple"
                            CssClass="searchCntrl" Width="70%">
                        </asp:DropDownList>
                    </div>
                    <div class="clear"></div>
                    <div class="row">
                    </div>
                </div>
                <div class="fullpanel textalignright">
                    <a tabindex="9" class="btn-search-clear" onclick="clear_form_elements('divTopContainer');" onkeypress="clear_form_elements_ForTab(event,'divTopContainer');" href="javascript:void(0);">Clear</a>
                    <input type="button" id="btnSearch" tabindex="11" class="btn-search" onclick="javascript: return fn_GetSearchResult(0);"
                        value="Search" title="Search" />
                </div>
            </div>
            <a href='javascript:void(0);' class="closedivSmall" onclick="toggle_TopContainer();" title="Toggle Search Panel" tabindex="11"><i class="fa fa-chevron-up"></i></a>
        </div>
        <div class="maincontainer">
            <div class="listpagediv" id="divResult">
                <asp:GridView ID="grdResult" runat="server" ClientIDMode="Static" AutoGenerateColumns="false" Width="95%" CssClass="listdiv" DataKeyNames="TrnInvoiceID" OnRowDataBound="grdResult_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="TrnInvoiceID" HeaderText="Invoice ID" />
                        <asp:BoundField DataField="TrnContractID" HeaderText="Contract ID" />

                        <asp:BoundField HeaderText="Sr." ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField DataField="CompanyName" HeaderText="Company" />
                        <asp:BoundField DataField="ClientName" HeaderText="Client" />
                        <asp:BoundField DataField="ContractName" HeaderText="Contract" />
                        <asp:BoundField DataField="PaymentModeName" HeaderText="Payment Mode" />
                        <asp:BoundField DataField="PaymentLevelName" HeaderText="Payment Level" />
                        <asp:BoundField DataField="ContractNo" HeaderText="Contract #" />
                        <asp:BoundField DataField="InvoiceNo" HeaderText="Invoice #" />
                        <asp:BoundField DataField="InvoiceDate" HeaderText="Invoice Date" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField DataField="FinancialYearName" HeaderText="Financial Year" />
                        <asp:BoundField DataField="PaymentLevelPer" HeaderText="Contract %" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#0}" />

                        <asp:BoundField DataField="GrossInvoiceAmount" HeaderText="Gross Amt." ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#0}" />
                        <asp:BoundField DataField="ServiceTaxPer" HeaderText="Service Tax %" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#0.00}" />
                        <asp:BoundField DataField="ServiceTaxAmount" HeaderText="Service Tax Amt." ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#0}" />
                        <asp:BoundField DataField="FinalInvoiceAmount" HeaderText="Final Invoice Amt." ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#0}" />

                    </Columns>
                </asp:GridView>
            </div>

        </div>
    </div> 
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cntMain" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="FootContent" runat="Server">
</asp:Content>

